package com.bsoft.ecommerce.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import rx.BackpressureOverflow;

import javax.persistence.*;
import java.util.Date;

//
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t-ecommerce_balance")
public class EcommerceBalance {
    @Id
    @Column(name = "id",nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "user_id",nullable = false)
    private Long userId;

    @Column(name = "balance",nullable = false)
    private Long balance;
    @CreatedDate
    @Column(name = "create_time",nullable = false)
    private Date createTime;
    @LastModifiedDate
    @Column(name = "update_time" ,nullable = false)
    private Date updateTime;

}
